package practice8;

public class Auto {
	int tyrenumber;
	String color;
	double weight;
	double speed;
	
	public Auto(int tyrenumber, String color, double weight, double speed){
		this.speed = speed;
		this.tyrenumber = tyrenumber;
		this.color = color;
		this.weight = weight;
	}
	
	public int getTyrenumber() {
		return tyrenumber;
	}

	public void setTyrenumber(int tyrenumber) {
		this.tyrenumber = tyrenumber;
	}

	public String getColor() {
		return color;
	}

	public void setColor(String color) {
		this.color = color;
	}

	public double getWeight() {
		return weight;
	}

	public void setWeight(double weight) {
		this.weight = weight;
	}

	
	
	public double getSpeed() {
		return speed;
	}

	public void setSpeed(double speed) {
		this.speed = speed;
	}
	
	public void speedUp(){
		speed ++;
	}
	
	public void speedDown(){
		speed --;
	}
	
	public void park(){
		speed = 0;
	}
	
	public String toString(){
		return "Auto[ tyrenumber = " + tyrenumber + " , speed = " + speed + "]";
	}

	
	

}
